<template>
  <el-dialog
  title="点位详情"
  :visible="xqVisible"
  width="40%"
  @close="closeFn">
  <span>
        <el-table
      :data="dwXqList"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="序号"
        width="70"
        type='index'>
      </el-table-column>
      <el-table-column
        prop="innerCode"
        label="机器编码"
        width="110">
      </el-table-column>
      <el-table-column
        prop="vmStatus"
        label="设备状态"
        width="120"
        :formatter='formAtter'>
      </el-table-column>
      <el-table-column
        prop="lastSupplyTime"
        label="最后一次供货时间">
      </el-table-column>
    </el-table>
  </span>
</el-dialog>
</template>

<script>

export default {
  props: {
    xqVisible: {
      type: Boolean,
      required: true
    },
    dwXqList: {
      type: Array,
      required: true
    }
  },
  data () {
    return {

    }
  },
  created () {
  },
  mounted () {},
  methods: {
    // 关闭页面
    closeFn () {
      this.$emit('update:xqVisible', false)
    },
    // 设备状态渲染处理
    formAtter (row, column, cellValue, index) {
      // console.log(cellValue)
      console.log(row, column, cellValue, index)
      if (cellValue === 1) return '运营'
      if (cellValue === 0) return '未投放'
      if (cellValue === 3) return '撤机'
    }
  }
}
</script>
<style lang="less" scoped>
/deep/.el-table__header th{
  background-color:#f3f6fb;
}
</style>
